MINCORE

Section: System Calls (2)
Updated: November 19, 1989
Index Return to Main Contents
 

NAME

mincore - check if pages are in memory  

SYNOPSIS

int mincore(addr, len, vec)
caddr_t addr;
int len;
char vec[];
 

DESCRIPTION

Mincore checks pages to see if they are in physical memory and returns their state.

For each page in the address range starting at address addr and extending for len bytes, a residency value is returned in the return vector vec.

The user must have allocated enough space in *vec to hold the result vector.  

RETURN VALUE

Mincore returns 0 for success and -1 for failure. The core values are returned in the vector vec. 0 indicates the page is not virtually present (i.e. is an invalid address). 1 indicates the page is paged out. 2 indicates the page is clean and unreferenced. 3 indicates the page is clean and referenced. 4 indicates the page is dirty.  

BUGS

This command is machine-dependent. In particular, some machines may not be able to determine if a page has been referenced.  

SEE ALSO

mmap(2)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
BUGS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 04:51:41 GMT, January 31, 2023